/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.expert.entity.SolutionFaceProductMixDetail;

/**
 *  方案产品步骤详细DAO接口
 * @author liujiang
 * @version 2013-08-19
 */
public interface SolutionFaceProductMixDetailDao extends SolutionFaceProductMixDetailDaoCustom, CrudRepository<SolutionFaceProductMixDetail, Long> {
	@Query("select distinct d from SolutionFaceProductMixDetail d, ProductCategoryStoreType t "
			+ " where d.product.productCategory.id = t.productCategory.id and d.product.status = 0 "
			+ " and d.solutionFaceProductMix.id = ?1 and t.storeType.id = ?2")
	public List<SolutionFaceProductMixDetail> getByMix(long mixId, long storeTypeId);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface SolutionFaceProductMixDetailDaoCustom extends BaseDao<SolutionFaceProductMixDetail> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class SolutionFaceProductMixDetailDaoImpl extends BaseDaoImpl<SolutionFaceProductMixDetail> implements SolutionFaceProductMixDetailDaoCustom {

}
